package com.gensdai.leliang.entity.parseBean;

import com.bluelinelabs.logansquare.annotation.JsonField;
import com.bluelinelabs.logansquare.annotation.JsonObject;

import java.io.Serializable;
import java.util.List;

/**所有解析的基础类
 * Created by Administrator on 2017/6/5.
 */
@JsonObject
public class BaseParse<T> {
    @JsonField
    public int code;
    @JsonField
    public String message;
    @JsonField
    public boolean success;
    @JsonField
    public T data;

    @JsonObject
    public static class OrderIDBean{
        @JsonField
        public String orderId;
    }

    /*预备订单的返回实体类*/
    @JsonObject
    public static class properOrder {
        /**
         * id : 161618
         * num : 1
         * price : 399.99
         * name : 测试属性名3
         * state : 1
         * vipPrice : 5.0
         * orderId : 1b0d7917dc674ca494d7b232370ddbe0
         */

        @JsonField public int id;
        @JsonField public String num;
        @JsonField public String price;
        @JsonField public String name;
        @JsonField public String state;
        @JsonField public String vipPrice;
        @JsonField public String orderId;
        @JsonField public String grouthBei;
        @JsonField public String transFerFee;   //配送费
        @JsonField public String waitPayPrice;  //待支付金额
        @JsonField public String payAliUrl;  //待支付金额

    }


    /*订单 详情*/
    @JsonObject
    public static class OrderInfo {
        /**
         * orderCreateTime : {"date":7,"day":3,"hours":14,"minutes":27,"month":5,"nanos":0,"seconds":34,"time":1496816854000,"timezoneOffset":-480,"year":117}
         * transFerFee : 0
         * orderState : 1
         * orderNo : 17060714273400000002
         * orderPayTime : null
         * backGrouthBey : 0
         * orderPrice : 10
         * orderAttributeMap : [{"attributeName":"（属性1）真冠烤香馍片散称10元/斤","logo":"e06ee21b-c085-45a4-9961-66ffc08b7394.JPG","stockNum":84,"buyPrice":10,"buyNum":1,"productName":"真冠烤香馍片散称10元/斤"}]
         * proTotalPrice : 10
         * grouthBei : 0
         * invalidTimeNote : 剩2天4小时自动关闭
         */

        @JsonField public OrderCreateTimeBean orderCreateTime;         //订单创建时间
        @JsonField public String transFerFee;                              //订单运费
        @JsonField public int orderState;                               //订单状态  1:待付款，2：待发货 3：已发货(待收货)：4：已完成  5:已取消
        @JsonField public String orderNo;                                //订单号
        @JsonField public OrderCreateTimeBean orderPayTime;                          //订单付款时间
        @JsonField public OrderCreateTimeBean deliverDate;                          //发货时间
        @JsonField public OrderCreateTimeBean receiptDate;                          //收货时间
        @JsonField public String backGrouthBey;                            //返现成长贝
        @JsonField public String orderPrice;                               //订单总格
        @JsonField public String proTotalPrice;                            //商品总价
        @JsonField public String grouthBei;                                //成长贝
        @JsonField public String invalidTimeNote;                       //提示信息
        @JsonField public String type;                       //是否可以退款
        @JsonField public boolean hasEvaluate ;                       //是否评价
        @JsonField public float waitPayPrice;                       //待付款
        @JsonField public List<OrderAttributeMapBean> orderAttributeMap;   //订单产品属性详情
        @JsonField public Address address;      //订单收货人

    }

    @JsonObject
    public static class Address{
        @JsonField public String name;
        @JsonField public String phone;
        @JsonField public String address;
        @JsonField public String provinceId;
        @JsonField public String cityId;
    }

    @JsonObject
    public static class OrderAttributeMapBean implements Serializable{
        /**
         * attributeName : （属性1）真冠烤香馍片散称10元/斤
         * logo : e06ee21b-c085-45a4-9961-66ffc08b7394.JPG
         * stockNum : 84
         * buyPrice : 10
         * buyNum : 1
         * productName : 真冠烤香馍片散称10元/斤
         */

        @JsonField public String attributeName;
        @JsonField public String productAttributeId;
        @JsonField public String logo;
        @JsonField public int stockNum;
        @JsonField public String buyPrice;
        @JsonField public int buyNum;
        @JsonField public String productName;
        @JsonField public String orderAttributeId;
         public String commentStr = "";

    }

    @JsonObject
    public static class OrderCreateTimeBean {
        /**
         * date : 7
         * day : 3
         * hours : 14
         * minutes : 27
         * month : 5
         * nanos : 0
         * seconds : 34
         * time : 1496816854000
         * timezoneOffset : -480
         * year : 117
         */

        @JsonField public int date;
        @JsonField public int day;
        @JsonField public int hours;
        @JsonField public int minutes;
        @JsonField public int month;
        @JsonField public int nanos;
        @JsonField public int seconds;
        @JsonField public long time;
        @JsonField public int timezoneOffset;
        @JsonField public int year;


    }
}
